<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.lmpop.frame.util.PageTools" %>
<%@ page import="com.lmpop.trade.ti_newscomment.Ti_newscommentInfo" %>
<%@ page import="com.lmpop.trade.ti_user.*"%>

<%
	request.setCharacterEncoding("UTF-8");

	Ti_userInfo userinfo = new Ti_userInfo();
	Map newsConditionMap = new Hashtable();
	
	String s_news_id = "",news_title="";
	if(request.getParameter("info_id")!=null && !request.getParameter("info_id").equals("")){
		s_news_id = request.getParameter("info_id");
		newsConditionMap.put("news_id",s_news_id);
	}
	Ti_newscommentInfo ti_newscommentInfo = new Ti_newscommentInfo();
	

	String iStart = "0";
	int limit = 5;

	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");

	List list = ti_newscommentInfo.getListByTi_newscomments(newsConditionMap,Integer.parseInt(iStart),limit);
    int counter = ti_newscommentInfo.getCountByID(newsConditionMap);

	String pageString = new PageTools().getGoogleToolsBar(counter,"newscomment.jsp?info_id="+s_news_id+"&iStart=",Integer.parseInt(iStart),limit);

	
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="/templets/html/shop/css/layout.css" />
    <link rel="stylesheet" type="text/css" href="/templets/html/shop/css/jll.css" />
<body>
<div class="yj_pl">
	<div class="newcommlist">
		
		<% 
			int listsize = 0;
			if(list!=null && list.size()>0&& !s_news_id.equals("") ){
				listsize = list.size();
				Map map = new Hashtable();
				for(int i=0;i<list.size();i++){
					map = (Hashtable)list.get(i);
					String info_id="",cust_id="",in_date="",content="",title="",cust_name="";
					if(map.get("in_date")!=null) in_date = map.get("in_date").toString();
					if(in_date.length()>1)in_date=in_date.substring(0,19);
					if(map.get("content")!=null) content = map.get("content").toString();
					if(map.get("user_id")!=null) {
						cust_id = map.get("user_id").toString();			
						cust_name = userinfo.getPersonalNameByUserId(cust_id);
					}		
		  %>		
			<div class="clearr">
				<span class="l">会员：<%=cust_name%> </span>
				<span class="r"><%=in_date%></span>
			</div>		
			<div class="yj_bottom"><p class="xiangxi"><%=content%></p></div>
			<div class="line"></div>

		 <%
				}
			}else{
		 %>
		 <div class="w300">暂无信息</div>

		 <%
			}	 
		 %>
		 
	</div>
	<div class="clear"></div>
</div>

<div style="text-align:center;height:24px;padding:10px 0 15px 0;zoom:1;" >
<%if(Integer.parseInt(iStart)>5){%>
	<%=pageString%>&nbsp;&nbsp;&nbsp;&nbsp; <span>全部评论(<%=counter%>)</span>	
	<%}%>
</div>


 </body>
</html>		


